package com.example.gss.entity;

import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 奖学金实体类，对应数据库中的scholarship表
 */
@Data
public class Scholarship implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    private String scholarshipId; // 奖学金ID
    private String name;          // 名称(国家奖学金/学业奖学金/专项奖学金等)
    private String level;         // 级别(国家级/省级/市级/校级)
    private BigDecimal maxAmount; // 最高金额
    private Integer year;         // 评定年度

    // 无参构造函数
    public Scholarship() {
    }

    // 有参构造函数
    public Scholarship(String scholarshipId, String name, String level,
                       BigDecimal maxAmount, Integer year) {
        this.scholarshipId = scholarshipId;
        this.name = name;
        this.level = level;
        this.maxAmount = maxAmount;
        this.year = year;
    }

    // 重写toString方法
    @Override
    public String toString() {
        return "Scholarship{" +
                "scholarshipId='" + scholarshipId + '\'' +
                ", name='" + name + '\'' +
                ", level='" + level + '\'' +
                ", maxAmount=" + maxAmount +
                ", year=" + year +
                '}';
    }
}